package Main;

import java.io.EOFException;
import java.io.IOException;
import java.io.UnsupportedEncodingException;

import javax.swing.JFrame;

import GUI.LogIn;
import Socket.TCPClient;

public class Main {
	public static void main(String[] args) throws UnsupportedEncodingException {

	//	TCPClient application; // declare client application

		// if no command line args
	//	if (args.length == 0)
		//	application = new TCPClient("10.32.122.217"); // connect to localhost
		// else
		//	application = new TCPClient(args[0]); // use args to connect

		// application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		// application.runClient(); // run client application
		LogIn logIn = new LogIn();
		logIn.fire();		
		try {
			TCPClient.runClient();
		} catch (EOFException e) {
			// TODO Auto-generated catch block
			System.out.println("Server disconnected");
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			System.out.println("Server disconnected");
			e.printStackTrace();
		}
	} // end main

}
